Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-18559: Cleanup FinalizedFeatures #18593

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

frankvicky
Copy link
Contributor

JIRA: KAFKA-18559
Cleanup the zk logic and test in FinalizedFeatures

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions bot added triage PRs from the community core Kafka Broker kraft small Small PRs labels Jan 17, 2025
Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frankvicky thanks for this patch. please take a look at one small comment.

this.metadataVersion = metadataVersion;
this.finalizedFeatures = new HashMap<>(finalizedFeatures);
this.finalizedFeaturesEpoch = finalizedFeaturesEpoch;
// In KRaft mode, we always include the metadata version in the features map.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please keep the comment "In KRaft mode, we always include the metadata version in the features map"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.
To avoid confusion, I delete the in kraft.

@github-actions github-actions bot removed the triage PRs from the community label Jan 19, 2025
) {
Objects.requireNonNull(metadataVersion);
this.metadataVersion = metadataVersion;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please merge them?

this.metadataVersion = Objects.requireNonNull(metadataVersion);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!
I have just updated the patch

@frankvicky frankvicky force-pushed the KAFKA-18559 branch 3 times, most recently from b7a6b06 to a7c06fe Compare January 22, 2025 02:35
} else {
this.finalizedFeatures.remove(MetadataVersion.FEATURE_NAME);
}
// Intentionally include metadata version in features map for version consistency
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is a bit confusing to me - what are we trying to say?

Copy link
Contributor Author

@frankvicky frankvicky Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ijuma,

Thanks for the review.
Previously, I simply deleted // In KRaft mode from the comment, but I realized this could be confusing. Then I tried rephrasing it, but it seems even more confusing now. 😓
I'm wondering if we should delete the entire comment instead?
The original comment was to highlight the difference between zk and kraft behavior. Now that zk is gone, do we still need this comment?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to revisit all callers to double-check if this is still a requirement.

JIRA: KAFKA-18559
Cleanup the zk logic and test in `FinalizedFeatures`
@chia7712
Copy link
Member

the failed test is traced by https://issues.apache.org/jira/browse/KAFKA-18441

@chia7712 chia7712 merged commit fa2df3b into apache:trunk Jan 24, 2025
8 of 9 checks passed
pranavt84 pushed a commit to pranavt84/kafka that referenced this pull request Jan 27, 2025
airlock-confluentinc bot pushed a commit to confluentinc/kafka that referenced this pull request Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants